public class Test {
    public static void sort(int[] nums){
        int num = 0;
        for (int i = 0; i < nums.length ; i++) {
            num = num ^ nums[i];

        }
        System.out.println(num);

    }
    public static void main(String[] args) {

      int[] nums = new int[]{1,1,7,7,4,3,4};
      sort(nums);
    }
}
